<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of the routes that are handled
| by your application. Just tell Laravel the URIs it should respond
| to using a Closure or controller method. Build something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index');
Route::get('/article/{id}.shtml','Admin\ArticleController@show');
Route::group(['namespace'=>'Admin','prefix'=>'admin','middleware'=>['auth']],function($router){
    // 后台首页
    require_once __DIR__ . '/admin/HomeRoute.php';
    // 管理员
    require_once __DIR__ . '/admin/ManagerRoute.php';
    // 文章管理
    require_once __DIR__ . '/admin/ArticleRoute.php';
    // 分类列表管理
    require_once __DIR__ . '/admin/CategoryRoute.php';

});
